<template>
    <div class="main-container" id="main-container">
        <div style="background-color: #fff; height:100%;" id="basicData">
           <a-tabs   :lazy-load="true" type="card" @change="tabsChange" justify>
                 <a-tab-pane title="测试标准" key="1">
                    <div style="height: 100%;">
                         <test-standard />  
                      </div>
                 </a-tab-pane> 
                 <a-tab-pane title="测试类型" key="2">  
                      <div style="height: 100%;"> 
                         <test-type />
                      </div> 
                 </a-tab-pane>  
                 <a-tab-pane title="面料测试项目" key="3">
                      <div style="height: 100%;">
                         <fabric-testing /> 
                     </div>  
                 </a-tab-pane> 
                 <a-tab-pane title="测试方法" key="4">  
                      <div style="height: 100%;"> 
                         <test-method />  
                     </div> 
                 </a-tab-pane> 
                 <a-tab-pane title="面料测试要求" key="5">  
                      <div style="height: 100%;">
                         <fabri-testing-require />     
                     </div>
                 </a-tab-pane>  
                 <a-tab-pane title="面料测试大类" key="6"> 
                      <div style="height: 100%;">  
                         <fabric-testing-category />   
                     </div>
                 </a-tab-pane>
                 <a-tab-pane title="测试标准项目定义" key="7">  
                      <div style="height: 100%;">   
                         <test-standard-definition />    
                     </div>
                 </a-tab-pane>
                 <a-tab-pane title="客户测试项目定义" key="8">
                      <div style="height: 100%;"> 
                         <customer-test-definition />    
                     </div> 
                 </a-tab-pane>  
                 <a-tab-pane title="推送类别" key="9"> 
                      <div style="height: 100%;">
                         <push-category />    
                     </div> 
                 </a-tab-pane> 
              
           </a-tabs>
        </div>    
    </div>
 </template> 
 
 <script lang="ts">
import { defineComponent } from 'vue'
import emitter from '@/hooks/useEventBus'
export default defineComponent({
        name:'basicData',
        setup() {
            const tabsChange = (e:string | number) => {  
                emitter.emit('window-change'); 
                if(e === '1'){
                    emitter.emit('refresh-testStandard') 
                }else if(e === '2'){
                    emitter.emit('refresh-testType') 
                }else if(e === '3'){
                    emitter.emit('refresh-fabricTesting') 
                }else if(e === '4'){
                    emitter.emit('refresh-testMethod') 
                }else if(e === '5'){
                    emitter.emit('refresh-fabriTestingRequire') 
                }else if(e === '6'){
                    emitter.emit('refresh-fabricTestingCategory') 
                }else if(e === '7'){
                    emitter.emit('refresh-testStandardDefinition') 
                }else if(e === '8'){
                    emitter.emit('refresh-customerTestDefinition') 
                }else if(e === '9'){
                    emitter.emit('refresh-pushCategory')  
                }
                // emitter.emit('refresh-DystuffProjectDifin') 
            }
            return {
               tabsChange
            }
        },
   })
 </script>
 
<style scoped >
 .main-container {
     height: 100%;
 }
 :deep(.ag-cell) {
     border-right: 1px solid #dde2eb;
 }
 
 :deep(.ag-header-cell) {
     border-right: 1px solid #dde2eb;
 }
 
 :deep(.ag-cell-value) {
     user-select: initial;
     -moz-user-select: text;
     -ms-user-select: text;
     -webkit-user-select: text;
 }
</style>